
#import "PywUser.h"

@implementation PywUser

- (instancetype)init
{
    if (self) {
        _passport = @"";
        _password = @"";
        _accountType = @"";
        
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.passport forKey:@"passport"];
    [aCoder encodeObject:self.password forKey:@"password"];
    [aCoder encodeObject:self.timeStamp forKey:@"timeStamp"];
    [aCoder encodeBool:self.autoLogin forKey:@"autoLogin"];
    [aCoder encodeBool:self.rememberPwd forKey:@"rememberPwd"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    self.passport = [aDecoder decodeObjectForKey:@"passport"];
    self.password = [aDecoder decodeObjectForKey:@"password"];
    self.timeStamp = [aDecoder decodeObjectForKey:@"timeStamp"];
    self.autoLogin = [aDecoder decodeBoolForKey:@"autoLogin"];
    self.rememberPwd = [aDecoder decodeBoolForKey:@"rememberPwd"];
    
    return self;
}

@end
